home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / internet / net commander 1.0 / ISP / SCRPTLST / TELALINK.CMD < prev    next >
Encoding:
Text File  |  1996-02-17  |  3.6 KB  |  107 lines

  1. #        Telalink Login.cmd for Trumpet Winsock
  2. #
  3. #
  4. %ok = [load $phone]
  5. %ok = [load $passwd]
  6. %ok = [load $username]
  7. %ok = [load $isdnvar]
  8. %ok = [load $isdnphone]
  9. %ok = [load $isdninit]
  10. %ok = [load $modeminit]
  11. # This script (c) Copyright 1996 Tom Godbold & The Telalink Corporation
  12. # All Rights Reserved
  13. # set up dial string - isdn or standard
  14. display \n\n\n\n"< Login to Telalink Command Script Now Running >"\n
  15. if lower (copy ($isdnvar,1,1)) = "y"
  16. $dialstring = "ATD " + $isdnphone
  17. else
  18. $dialstring = "ATDT " + $phone
  19. end
  20. #
  21. %attempts = 10
  22. display \n"< Checking your modem >"\n
  23.  output "at"\13
  24.  if ! [input 10 OK\n]
  25. display \n\n
  26. display "*************************************************************************"\n
  27. display "**  Your Modem is not responding.  This could be due to the fact that: **"\n
  28. display "**                                                                     **"\n
  29. display "**            1) Your modem is turned off                              **"\n
  30. display "**            2) This program is not checking the correct COM port     **"\n
  31. display "**                                                                     **"\n
  32. display "*************************************************************************"\n
  33. display \n\n
  34. display "Here are some things to check:"\n\n
  35. display "  1.  Be sure that your modem is plugged in and the power switch is ON."\n
  36. display "  2.  Be sure that this program is set to check the proper COM port."\n
  37. display "      To do this, click File (above) and click Setup (the first option)."\n
  38. display "      Change the SLIP PORT setting to the number that corresponds to the port"\n
  39. display "      that your modem is connected to  (i.e. COM2 = SLIP PORT 2)."\n
  40. display "      Note:  You must quit this program and reload it after making this change."\n\n
  41.   abort 
  42. end
  43. #
  44. display \n"< Modem connected properly >"\n
  45. # if bitsurfer, send this
  46. if lower (copy ($isdnvar,1,1)) = "y"
  47. output $isdninit\13
  48. input 10 OK
  49. else
  50. # else send a standard modem init string
  51. display "< Sending Modem Initialization String >"\n
  52. output $modeminit\13
  53. input 10 OK
  54. display \n"< Modem Initialization String accepted >"\n
  55. end
  56. #
  57. %n = 0
  58. repeat
  59.   if %n = %attempts
  60.     display \n\n"Unable to connect to Telalink at this time.  Please try again later."\n\n
  61.     abort
  62.     end
  63.   display \n"< Sending Modem Dial Command & Phone Number >"\n 
  64.   output $dialstring\13
  65.   display \n"< Waiting for Connection to Terminal Server >"\n
  66.   %ok = [input 60 CONNECT]
  67.   %n = %n + 1
  68. until %ok
  69. #
  70. display \n"< Connected to Terminal Server >"\n
  71. #
  72. #  wait for the username prompt
  73. #
  74. display \n"< Sending returns to prod the terminal server >"\n
  75. output \13
  76. output \13
  77. display \n"< Waiting for the username: prompt >"\n
  78. input 60 :
  79. display \n"< Sending username >"\n
  80. output $username\13
  81. #
  82. # and the password
  83. #
  84. display \n\n"< Waiting for password prompt >"\n
  85. input 60 :
  86. display \n\n"< Sending password >"\n
  87. output $passwd\13
  88. #
  89. # we are now logged in
  90. # wait for the PPP session message to indicate username/password acceptance
  91. if [input 20 login]
  92.    display \n\n\n"** Warning! Username/password not accepted! **"\n
  93.    display "Did you type your password correctly when you set up your software?"\n
  94.    display \n"Password entered at setup time was: "$passwd\n\n
  95.    display "If this is not correct, please consult your Telalink User Guide"\n
  96.    display "or contact Telalink."\n\n
  97.    display "Exiting login script."\n\n
  98.    abort
  99. else
  100.    display \n\n"** PPP Session enabled.  Will negotiate IP address. **"\n
  101. end
  102. display "** Successfully connected to Telalink **"\n
  103. end
  104. #
  105. # now we are finished.
  106. #
  107.